function test(){
    const a = () => {
        console.log('a')
    };

    const b = () => {
        console.log('b')
    };

    let type = 2;

    if(type === 1){
        a();
    }else{
        b();
    }
}

test();
